#! /bin/bash
make
lines=`cat /proc/cpuinfo |grep -E "vmx" | wc -l`
if [ $lines != "0" ]; then
echo "intel cpu"
sudo /sbin/rmmod kvm-intel
sudo /sbin/rmmod kvm
#sudo insmod x86/kvm.ko ignore_msrs=1
sudo /sbin/insmod x86/kvm.ko
#sudo insmod x86/kvm-intel.ko ept=0
#sudo insmod x86/kvm-intel.ko ept=1 emulate_invalid_guest_state=1
sudo /sbin/insmod x86/kvm-intel.ko ept=0
else
echo "amd cpu"
sudo /sbin/rmmod kvm-amd
sudo /sbin/rmmod kvm
sudo /sbin/insmod x86/kvm.ko
sudo /sbin/insmod x86/kvm-amd.ko
fi
